From: Dan Winship Date: Wed, 16 Mar 2011 17:16:38 +0000 (-0400) Subject: notificationDaemon: handle trayicon clicks in the overview X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8567 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=22bfd4f7c3e2e0f208f143c9939b7edbc5ddefbd;p=gnome-shell.git notificationDaemon: handle trayicon clicks in the overview If the user clicks a trayicon in the overview, drop out of the overview before passing the click on to the icon. (We have to actually wait for the overview animation to complete, in case the icon wants to get a pointer grab, which it would not be able to do with the overview active.) https://bugzilla.gnome.org/show_bug.cgi?id=641853 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index c3c1e34b7..2a59d9833 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -461,7 +461,18 @@ Source.prototype = { if (event.type() != Clutter.EventType.BUTTON_RELEASE) return false; - this._trayIcon.click(event); + if (Main.overview.visible) { + // We can't just connect to Main.overview's 'hidden' signal, + // because it's emitted *before* it calls popModal()... + let id = global.connect('notify::stage-input-mode', Lang.bind(this, + function () { + global.disconnect(id); + this._trayIcon.click(event); + })); + Main.overview.hide(); + } else { + this._trayIcon.click(event); + } return true; },